-- GENERATED SPELL FOR [Queen Angerboda] --


function spell0_24023(pUnit, Event) --@Anger of Gjalerbron,n/a--
pUnit:FullCastSpellOnTarget(43560,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24023', 10000, 1)
end

function spell1_24023(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24023', 3000, 1)
end

function spell2_24023(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_24023', 8267, 1)
end

function Sorts_24023(pUnit, Event)
local choix_sorts_24023 = math.random(0, 2)
if choix_sorts_24023 == 0 then
pUnit:RegisterEvent('spell0_24023', 1, 1)
end
if choix_sorts_24023 == 1 then
pUnit:RegisterEvent('spell1_24023', 1, 1)
end
if choix_sorts_24023 == 2 then
pUnit:RegisterEvent('spell2_24023', 1, 1)
end
end

function mob24023_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24023', math.random(1500, 3000), 1)
end

function mob24023_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24023_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24023_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24023, 1, 'mob24023_Action')
RegisterUnitEvent(24023, 2, 'mob24023_Leave')
RegisterUnitEvent(24023, 3, 'mob24023_Kill')
RegisterUnitEvent(24023, 4, 'mob24023_Die')
